﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Planer.Model.Validators.Base;

namespace Planer.Model.Validators
{
    public class ActionValidator : Validator<action>
    {
        public override void Validate(action Action)
        {
            if (Action == null) throw new ArgumentNullException("Action", NULL_ARGUMENT_MESSAGE);

            DescriptionValidator validator = new DescriptionValidator();
            validator.Validate(Action.descr);
            if (validator.Status == OperationStatusType.ERROR)
            {
                this.status = OperationStatusType.ERROR;
                this.Errors.AddRange(validator.Errors);
            }
        }
    }
}
